class StoreProductCategory < ApplicationRecord
  belongs_to :store
  has_many :products, class_name: "StoreProduct"

  scope :useable, -> { where(useable: true) }

  def unuse!
    self.update!(useable: false)
  end

  def sale_products
    products.showable
  end
end
